<!-- 设备信息 -->

<template>
	<Card>
		<template #head>
			设备信息
		</template>
		<template #body>
			<CellItemDetail label="设备编号" :value="sendRepairInfo.deviceNum"></CellItemDetail>
			<CellItemDetail label="设备名称" :value="sendRepairInfo.deviceName"></CellItemDetail>
			<CellItemDetail label="设备分类" :value="sendRepairInfo.deviceTypeToName"></CellItemDetail>
			<CellItemDetail label="设备型号" :value="sendRepairInfo.deviceModel"></CellItemDetail>
			<CellItemDetail label="设备序列号" :value="sendRepairInfo.deviceSerialNum"></CellItemDetail>
			<CellItemDetail label="设备数据" :value="sendRepairInfo.deviceData | DeviceData"></CellItemDetail>
			<CellItemDetail label="设备备注" :value="sendRepairInfo.deviceRemark"></CellItemDetail>

		</template>
	</Card>
</template>

<script>
	import Card from '@/components/card/components/cardDetail.vue'
	import CellItemDetail from '@/components/cell/itemDetail.vue'
	export default {
		props: {
			sendRepairInfo: {
				type: Object,
				default: () => {}
			},
		},
		data() {
			return {}
		},
		filters: {
			//设备数据（1.已备份，2.未备份）

			DeviceData(val) {
				if (val) {
					let obj = {
						1: '已备份',
						2: '未备份',
					}
					return obj[val] || '-'
				}
				return '-'
			}
		},
		watch: {

		},

		components: {
			Card,
			CellItemDetail
		}
	}
</script>

<style lang="scss" scoped>
	.info {

		&-ul {}

		&-item {
			margin-top: 30rpx;
			display: flex;

			>.label {
				flex: 1;
				font-weight: 400;

				font-size: 28rpx;
				color: #98A5B3;
			}

			>.content {
				flex: 4;
				font-weight: 400;
				font-size: 28rpx;
				color: #0F2E4D;
			}
		}

	}
</style>
